import request from "@/utils/request";
const VITE_APP_USER_URL = import.meta.env.VITE_APP_USER_URL;
/**
 * 检查用户在线状态
 * http://192.168.88.247:4999/web/#/14/194
 * @param {*} params
 * @returns
 */
export function checkStatus(params?: any) {
  return request({
    baseURL: VITE_APP_USER_URL,
    url: "/api/v1/check_status",
    method: "get",
    params
  });
}
/**
 * 刷新token
 * http://showdoc.wisetimes.cn:4999/web/#/92/596
 * @returns
 */
export function refreshtoken() {
  return request({
    url: "/api/v1/bs/user/refresh",
    method: "get"
  });
}
/**
 * 获取会员信息
 * http://showdoc.wisetimes.cn:4999/web/#/105/747
 * @returns
 */
export function getMemberInfo(noMsg?: boolean) {
  return request({
    noMsg: noMsg ?? false,
    url: "/api/v1/member/info",
    method: "get"
  });
}

/**
 * 获取用户 翻译币数量
 * http://192.168.88.247:4999/web/#/283/2495
 * @returns
 */
export function getUserTsb(params: any) {
  return request({
    url: "/charge/api/v1/user/charge_info",
    method: "get",
    params,
    noMsg: true
  });
}
